package day05;

import sun.security.rsa.RSACore;

import java.util.Scanner;

public class Addition {
    public static void main(String[] args) {
        int score=0;
        Scanner scanner =new Scanner(System.in);

        int s=0;
        for (int a=1; a<=10;a++){
            int b =(int) (Math.random()*100);
            int c=(int) (Math.random()*100);
            int result=b+c;
            System.out.println(b+"+"+c+"=?");
            System.out.println("算吧");
            int num = scanner.nextInt();
            if (result==num){
                System.out.println("算对了");
                score+=10;
            }else {
                System.out.println("算错了");
            }


        }
        System.out.println("总分："+score);
    }
}
